home *** CD-ROM | disk | FTP | other *** search
-
- Here you have 512x400 in a chained 8 bit video mode. This is the WATCOM
- version of Anthony Tavener's MODE-C1.ZIP (I think he is the one who did it)
-
- This conversion to WATCOM was performed by:
-
- John McCarthy
- 1316 Redwood Lane
- Pickering, Ontario.
- Canada, Earth, Milky Way (for those out-of-towners)
- L1X 1C5
- brian.mccarthy@canrem.com
-
- Send me a postcard from someplace near where you live!
-
- To implement the video mode: set_512x400();
- To change the video plane : set_plane(char); where char is 0,16,32 or 48
- To plot a pixel : pixel_plot(int x, int y, char colour);
-
- John McCarthy thanks those who created the 512x400 video mode and hopes
- he has not offended them with his conversion.
-
- Here is an excerpt from the original file MODE-C1.ZIP by Anthony Tavener
-
- ------------------------------------------------------------------------------
-
- The mode is something I call ModeC1, because numbers are kind of used up,
- and many letters too. The 'C' stands for chained, unlike Xmode's unchained
- structure. The '1' indicates which 'modeC' (512x400x8bit in this case).
- If you have a better naming scheme, use it - I just don't like writing big
- labels in my code :).
-
- There are a few advantages to a mode like this. One is the decent resolution.
- Most games use 320x200/240. The next step (other than pinched-for-memory
- modeX variants) is 640x480 (or that 400 line mutant freakish mode :). Three
- hundred thousand pixels for one screen is a lot to push around at good frame
- rates - two hundred thousand isn't quite as bad. Sixty or seventy thousand
- is getting too easy, and just plain looks bad. I don't like bad-guys right in
- my face before I can dicern what they look like!
-
- Other advantages are related to the horizontal resolution of 512 pixels. This
- allows easy transformation from x,y pairs to linear addresses - a common
- function. Also, paging is much easier. With 4k page granularity, 8 lines
- fits perfectly. Alignment occurs at 20k intervals with 640 pixels.
-
- The code should work on any 386+ with a CLGD-54xx based card. If it doesn't,
- please let me know (via email preferably). If you want to muck around with the
- register settings be careful; I've had no damage done to anything, and newer
- equipment is quite resilient, but there is always a possibility of breaking
- something! I briefly indicated some of the important SVGA registers relating
- to resolution. The dot-clock must be changed to match your resolution too
- (If you stay between about 200000-350000 pixel screen I think 25MHz should be
- okay). You'll know if the dot-clock is bad - too high and the screen will be
- very dark and take a while to stabilize; too low, the screen will be faded.
- If you read vidmodes.txt (VideoModes.doc from Linux XF86 distribution), you
- may notice that the dot clocks on cards favor the common resolutions. So
- modes with really odd resolutions may not be practical.
-
- For those wishing to create modes for other chipsets, make some comparisons
- between the regster functionality presented in the cirrus documentation, and
- you card's docs. Note that the standard VGA registers carry most of the
- burden relating to modes.
-
- Reminder: I take NO responibility for the actions of others. If you blow up
- your hardware that's your problem. I, personally, haven't had any problems,
- but messing with things like this is has it's potential hazards.
-
- I would like to thank Finn Thoegerson for compiling vgadoc3, and
- Chin Fang, Bob Crosson, and Eric S. Raymond for 'The Hitchiker's Guide
- to XFree86 Video Timing'. I wouldn't have gotten very far without both
- of these!
-
- -Daoloth of MetaSentience (Anthony Tavener)
- -cs94169@cs.ualberta.ca
- (This is temporary, a friend's account)